package com.firmboy.io_collection;

/**
 * 枚举单例实现
 *
 * @author firmboy
 * @create 2018-03-15 下午7:48
 **/
public enum Singleton {

    INSTANCE("hello"){
        public void someMethod(){
            System.out.println("success");
        }
    };

    private String name;

    public void printName(String name){
        System.out.println(name);
    }

    protected abstract void someMethod();

    Singleton(String name){
        this.name = name;
    }
}
